package com.legsem.jhosync.ws;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import com.legsem.jhosync.Server;

public class HttpServer extends Server {

    private HttpSession session;

    public HttpServer(HttpServletRequest request) {
        session = request.getSession(true);
    }

    public HttpSession getHttpSession() {
        return session;
    }

    public void setSessionAttribute(String name, Object value) {
        getHttpSession().setAttribute(name, value);

    }

    public Object getSessionAttribute(String name) {
        return getHttpSession().getAttribute(name);
    }

    public Object getConfigAttribute(String name) {
        return getHttpSession().getServletContext().getAttribute(name);
    }

}
